# frozen_string_literal: true

{{#generated_src_warning}}
{{generated_src_warning}}
{{/generated_src_warning}}

{{#require_core_guard?}}
unless Module.const_defined?(:Aws)
  {{#requires}}
  require '{{.}}'
  {{/requires}}
end
{{/require_core_guard?}}
{{^require_core_guard?}}
{{#requires}}
require '{{.}}'
{{/requires}}
{{/require_core_guard?}}

Aws::Plugins::GlobalConfiguration.add_identifier(:{{service_identifier}})

# This module provides support for {{full_name}}. This module is available in the
# `{{gem_name}}` gem.
#
{{^service.h2_required_setting?}}
# # Client
#
# The {Client} class provides one method for each API operation. Operation
# methods each accept a hash of request parameters and return a response
# structure.
{{#example_operation_name}}
#
#     {{example_var_name}} = {{module_name}}::Client.new
#     resp = {{example_var_name}}.{{example_operation_name}}(params)
{{/example_operation_name}}
#
# See {Client} for more information.
#
{{/service.h2_required_setting?}}
{{#service.h2_setting?}}
# # Async Client
#
# The {AsyncClient} class provides one asynchronous method for each API operation.
# Operation methods each accept a hash of request parameters and return an async
# response. For streaming operations, you can signal input events and register
# output event callbacks before waiting on the response.
{{#example_operation_name}}
#
#     {{example_var_name}} = {{module_name}}::AsyncClient.new
#     resp = {{example_var_name}}.{{example_operation_name}}(
#       # params and input stream
#      ) do |output_stream|
#       # register callbacks for events
#     end
{{/example_operation_name}}
#
# See {AsyncClient} for more information.
#
{{/service.h2_setting?}}
# # Errors
#
# Errors returned from {{full_name}} are defined in the
# {Errors} module and all extend {Errors::ServiceError}.
#
#     begin
#       # do stuff
#     rescue {{module_name}}::Errors::ServiceError
#       # rescues all {{full_name}} API errors
#     end
#
# See {Errors} for more information.
#
# @!group service
module {{module_name}}
  {{#autoloads}}
    {{#is_plugin}}
  module Plugins
    autoload :{{class_name}}, '{{file_path}}'
  end
    {{/is_plugin}}
    {{^is_plugin}}
  autoload :{{class_name}}, '{{file_path}}'
    {{/is_plugin}}
  {{/autoloads}}

  GEM_VERSION = '{{gem_version}}'

end

require_relative '{{prefix}}/customizations'
